package com.wyzz.hr.pojo.base;

import com.wyzz.hr.pojo.Statusconf;
import com.wyzz.hr.pojo.StatusconfPK;

import java.io.Serializable;

public abstract class BaseStatusconf implements Serializable {

	public BaseStatusconf() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseStatusconf(StatusconfPK id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	protected void initialize() {
	}

	public StatusconfPK getId() {
		return id;
	}

	public void setId(StatusconfPK id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public String getStatusconfDesc() {
		return statusconfDesc;
	}

	public void setStatusconfDesc(String statusconfDesc) {
		this.statusconfDesc = statusconfDesc;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Statusconf))
			return false;
		Statusconf statusconf = (Statusconf) obj;
		if (null == getId() || null == statusconf.getId())
			return false;
		else
			return getId().equals(statusconf.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Statusconf";
	public static String PROP_ID = "id";
	public static String PROP_STATUSCONF_DESC = "statusconfDesc";
	private int hashCode;
	private StatusconfPK id;
	private String statusconfDesc;

}
